
						<div id="operator_id" style="visibility:hidden; display:none;">{$operator->id()}</div>

						<h1 align="center">Изработени Операции от: {'cp1251'|iconv:'utf-8':$operator->name()}</h1>
						<p align="center">За периода от {$fromDateEdit}   до {$toDateEdit}</p>
						<form name="vsdeDate" action="{$smarty.server.PHP_SELF}?{$smarty.server.QUERY_STRING}" method="post">
							<input type="hidden" name="fromVsdeDate" id="fromVsdeDate" value="{$fromVsdeDate}" />
							<input type="hidden" name="toVsdeDate" id="toVsdeDate" value="{$toVsdeDate}" />
							<input type="hidden" name="group_by" id="group_by" value="" />

							<input type="button" name="" value="Групирано" onclick="setGroupBy('operation'); this.form.submit();" />
						</form>

						<br /><br />
						<br />

						<table cellspacing="0" width="100%">
							<tr>
								<td class="DialogTitle">Операции</td>
							</tr>
							<tr>
								<td class="DialogBorder">

									

									<table cellspacing="1" class="DialogBox">
										<tr>
											<td class="DialogBox" valign="top"><br />
												<form name="formOperatorWorks" action="{$smarty.server.PHP_SELF}?opid={$operator->id()}&act=preview" method="post">
													<input type="hidden" name="fromVsdeDate" id="fromVsdeDate" value="{$fromVsdeDate}" />
													<input type="hidden" name="toVsdeDate" id="toVsdeDate" value="{$toVsdeDate}" />

													<table cellpadding="2" cellspacing="1" width="100%">
														<tr class="TableHead">
															<td width="3%">&nbsp;</td>
															<td><a href="{$smarty.server.PHP_SELF}?{$getQuery}&order_by=date">Дата</a></td>
															<td width="3%" align="center"><a href="{$smarty.server.PHP_SELF}?{$getQuery}&order_by=id">&sect;</a></td>
															<td width="15%"><a href="{$smarty.server.PHP_SELF}?{$getQuery}&order_by=model_id">Модел</a></td>
															<td><a href="{$smarty.server.PHP_SELF}?{$getQuery}&order_by=operation_id">Операция</a></td>
															<td width="5%"><a href="{$smarty.server.PHP_SELF}?{$getQuery}&order_by=price">Ед. Цена</a></td>
															<td width="5%"><a href="{$smarty.server.PHP_SELF}?{$getQuery}&order_by=count">Бройки</a></td>
															<td width="5%"><a href="{$smarty.server.PHP_SELF}?{$getQuery}&order_by=total">Общо</a></td>
														</tr>

													{foreach from=$opWorkOperations item=op}
														<tr class="bottomborder {cycle values=",TableSubHead"}">
															<td>
																<input type="checkbox" name="work_ids[{$op.unique_id}]" id="chk_{$op.unique_id}" onclick="chkClicked('{$op.unique_id}');" />
															</td>
															<td width="15%">
																{$op.date|date_format:"%d-%m-%Y"}
															</td>
															<td>{$op.id}</td>
															<td width="15%">
																<div style="display:none;" id="dfl_model_{$op.unique_id}">{$op.models_id}</div>

																<input type="hidden" name="posted_data[{$op.unique_id}][model]" value="{$op.models_id}" />
																{'cp1251'|iconv:'utf-8':$op.model_number}.&nbsp;&nbsp;{'cp1251'|iconv:'utf-8':$op.model_name}
															
															</td>
															<td>
																<div style="display:none;" id="dfl_operation_{$op.unique_id}">{$op.operations_id}</div>

																<input type="hidden" name="posted_data[{$op.unique_id}][operation]" value="{$op.operations_id}" />
																{'cp1251'|iconv:'utf-8':$op.operation_number}.&nbsp;&nbsp;{'cp1251'|iconv:'utf-8':$op.operation_name}
															
															</td>
															<td width="5%">
																<div style="display:none;" id="dfl_price_{$op.unique_id}">{$op.price}</div>
																<input type="hidden" name="posted_data[{$op.unique_id}][price]" id="price_{$op.unique_id}" value="{$op.price}" />
																<div id="price_view_{$op.unique_id}">{$op.price}</div>
															</td>
															<td width="5%">
																<div style="display:none;" id="dfl_count_{$op.unique_id}">{$op.count}</div>
																<input type="text" size="3" id="count_{$op.unique_id}" name="posted_data[{$op.unique_id}][count]" value="{$op.count}" onchange="countChanged('{$op.unique_id}', this.value);" />
															</td>
															<td width="5%">
																<div id="total_view_{$op.unique_id}">{$op.sub_total}</div>
															</td>
														</tr>
													{/foreach}
														<tr>
															<td colspan="7">&nbsp;</td>
														</tr>
														<tr>
															<td colspan="5">&nbsp;</td>
															<td align="left"><b>TOTAL:</b></td>
															<td align="right">{$opWorkTotal}</td>
														</tr>
														<tr>
															<td colspan="7">
																<input type="submit" name="sub_works" value="Запази" />
																<input type="button" name="open_print" value="Принтиране" onclick="vsOpenPrintPreview('operator_work');" />
															</td>
														</tr>
													</table>
												</form>
												<br />&nbsp;
											</td>
										</tr>
										<tr>
											<td>{$pager}</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>


